class Solution {
    public boolean isStraight(int[] nums) {
        Set<Integer> map = new HashSet<>();
        int i = 0;
        int max = 0;
        int min = 14;
        for(i = 0;i<nums.length;i++) {
            if(nums[i] != 0) {
                if(!map.contains(nums[i])) {
                    map.add(nums[i]);
                    max = Math.max(max,nums[i]);
                    min = Math.min(min,nums[i]);
                }else {
                    return false;
                }
            }
        }
        return (max - min) < 5?true:false;
    }
}